package com.sparrow.common.map;


public class Position {
    private float x;
    private float y;
    private float z;

    public Position() {

    }

    public Position(float x, float y, float z) {
        this.x = x;
        this.y = y;
        this.z = z;
    }

    public float getX() {
        return x;
    }

    public void setX(float x) {
        this.x = x;
    }

    public float getY() {
        return y;
    }

    public void setY(float y) {
        this.y = y;
    }

    public float getZ() {
        return z;
    }

    public void setZ(float z) {
        this.z = z;
    }

    public static Position copyOf(Position other) {
        return new Position(other.x, other.y, other.z);
    }

    public int[] toArray() {
        return new int[] {(int) x, (int) z};
    }

    @Override
    public String toString() {
        return "pos(" + x + "," + y + "," + z + ")";
    }
}
